var History = function()
{
	this.img = new Image();
	this.img.src = "Images/Historia_1.jpg";
	
	this.fala_1 = new Image();
	this.fala_1.src = "Images/Quadro1.png";
	
	this.fala_2 = new Image();
	this.fala_2.src = "Images/Quadro2.png";
	
	this.fala_3 = new Image();
	this.fala_3.src = "Images/Quadro3.png";
	
	this.img_av = new Array();
	
	this.img_av[0] = new Image();
	this.img_av[0].src = "Images/Avance_1.png";
	
	this.img_av[1] = new Image();
	this.img_av[1].src = "Images/Avance_2.png";
	
	this.fogo = new Array();
		
	this.fogo[0] = new Image();
	this.fogo[0].src = "Images/Fogo_Lareira0001.png";
	
	this.fogo[1] = new Image();
	this.fogo[1].src = "Images/Fogo_Lareira0002.png";
	
	this.fogo[2] = new Image();
	this.fogo[2].src = "Images/Fogo_Lareira0003.png";
	
	this.fogo[3] = new Image();
	this.fogo[3].src = "Images/Fogo_Lareira0004.png";
	
	this.fogo[4] = new Image();
	this.fogo[4].src = "Images/Fogo_Lareira0005.png";
	
	this.fogo[5] = new Image();
	this.fogo[5].src = "Images/Fogo_Lareira0006.png";
	
	this.fogo[6] = new Image();
	this.fogo[6].src = "Images/Fogo_Lareira0007.png";
	
	this.fogo[7] = new Image();
	this.fogo[7].src = "Images/Fogo_Lareira0008.png";

	this.fogo[8] = new Image();
	this.fogo[8].src = "Images/Fogo_Lareira0009.png";
	
	this.fogo[9] = new Image();
	this.fogo[9].src = "Images/Fogo_Lareira0010.png";
	
	this.fogo[10] = new Image();
	this.fogo[10].src = "Images/Fogo_Lareira0011.png";
	
	this.fogo[11] = new Image();
	this.fogo[11].src = "Images/Fogo_Lareira0012.png";
	
	this.audio = new Image();
	this.audio.src = "Images/AudioOFF_new.png";
	
	this.play = new Image();
	this.play.src = "Images/Play.png";
	
	this.fire = 0;
	this.timer = 0;

	this.update = function()
	{
		this.timer += 1;
		
		if(this.timer % 3 == 0)
		{
			this.fire++;
		}
		
		if(this.fire >= 11)
		{
			this.fire = 0;
		}
		
		console.log(this.timer);
	}
	
	this.draw = function()
	{
		graphics.DrawImage(this.img, 0, 0);
		graphics.DrawImage(this.img_av[sceneManager.av_h], 375, 540);
		graphics.DrawImage(this.fogo[this.fire], 380, 222);
		
		if(!sceneManager.audio)
		{
			graphics.DrawImage(this.audio, 689, 545);
		}
		
		if(sceneManager.pause)
		{
			graphics.DrawImage(this.play, 735, 544);
		}
		
		if(sceneManager.dialogo1)
		{
			graphics.DrawImage(this.fala_1, 450, 100);
		}
		
		if(sceneManager.dialogo2)
		{
			graphics.DrawImage(this.fala_2, 70, 100);
		}
		
		if(sceneManager.dialogo3)
		{
			graphics.DrawImage(this.fala_3, 500, 170);
		}
	}
}

var history = new History();